<?php
define('IN_PHP', true);
include('util.php');
include('functions.php');
session_start();
xmysql_connect();
$url = $_SERVER['REQUEST_URI'];
//the code below won't work if you aren't running this in the webapp folder
$pages = Array(
        "/alboochi/index.php" => "- Student Information System",
        "/alboochi/intro.php" => "- Welcome",		
		"/alboochi/manage.php" => "- Manage Contacts",
        "/alboochi/account.php" => "- Account Settings",
        "/alboochi/edit-student.php" => "- Edit Student Information",
		"/alboochi/login.php" => "- Login",
        "/alboochi/register.php" => "- Register"
);
$title = $pages[$url];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">

<link rel="stylesheet" type="text/css" media="screen" href="styling.css"/>

<head>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
   <title>Alboochi <?php echo $title ." ".get_user(); ?> </title>
</head>

<body>

 <div id="wrapper">
   
  <div id="header">
   <h1>
   	<a href="index.php">
    	<img src="images/alboochi.jpg" alt="Alboochi User Manager" title="Alboochi User Manager" border="0" />
    </a>
   </h1>
   
   <h2>by Arian Xhezairi<h2><br/>
   
   <div class="login">
        <?php
        $user = get_user();
        if($user !== NULL) {
      	echo "Welcome " . $user . ". ";
        } else {
	      echo 'Welcome guest.';
       } ?>
   </div>
</div>